Add metadata latency sensitivity analysis to DuckLake concurrency benchmarks#382
Merged
fuziontech merged 4 commits intomainfrom Apr 2, 2026
Merged
Add metadata latency sensitivity analysis to DuckLake concurrency benchmarks#382fuziontech merged 4 commits intomainfrom
fuziontech merged 4 commits intomainfrom
Conversation
…chmarks Introduces a TCP latency proxy that injects configurable one-way delay between DuckDB/DuckLake and the metadata PostgreSQL, enabling sensitivity analysis of how network latency affects transaction conflict rates. Key changes: - TCP latency proxy (latency_proxy.go) with bidirectional delay injection - DUCKGRES_BENCH_LATENCIES env var to sweep latencies (e.g. 0ms,25ms,50ms,100ms) - Per-latency duckgres harnesses with proxy in front of metadata PostgreSQL - JSON report includes metadata_latency_ms per metric and latencies_tested_ms - justfile recipes: bench-ducklake-latency, bench-ducklake-full-matrix - Version matrix script passes through latency config for 2D (version x latency) analysis Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20837c2 to
183f248
Compare
…flicts Reproduces the full SQLMesh model execution pattern: each concurrent model does CREATE OR REPLACE TABLE ... AS SELECT followed by COMMENT ON TABLE to set the model description. The COMMENT is a separate DDL hitting the DuckLake metadata store, widening the conflict window — matching the prod log pattern: /* SQLMESH_PLAN: ... */ COMMENT ON TABLE "schema"."model" IS 'description' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Documents how to run the concurrency benchmarks, latency sensitivity analysis, version matrix, JSON output schema, and environment variables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
latency_proxy.go) that injects configurable bidirectional delay between DuckDB/DuckLake and the metadata PostgreSQL, enabling analysis of how network latency (simulating cross-region RDS) affects transaction conflict ratesDUCKGRES_BENCH_LATENCIESenv var — comma-separated latency sweep, e.g.0ms,25ms,50ms,100ms. Default:0ms(backward-compatible, no behavior change)metadata_latency_msper metric andlatencies_tested_msto the report for downstream comparisonbench-ducklake-latency(single version, latency sweep) andbench-ducklake-full-matrix(version × latency 2D matrix)DUCKGRES_BENCH_LATENCIESfor 2D analysisUsage
How it works
The latency proxy sits between DuckDB's DuckLake extension and the metadata PostgreSQL:
Each read/write to the proxy gets a
time.Sleep(latency)before forwarding, so a 50ms setting adds ~100ms RTT overhead — matching cross-region RDS latency.Architecture
LatencyProxyis a plain Go TCP proxy (no external dependencies)TestHarnessis created per latency level with the proxy wired inTestDuckLakeConcurrentTransactions/latency_0ms/concurrent_inserts_same_tableTest plan
TestLatencyProxy— zero latency forwarding, measurable latency (~100ms RTT for 50ms one-way), close terminates connectionsgo vet ./...cleanDUCKGRES_BENCH_LATENCIES=0ms,50ms(requires DuckLake infra)🤖 Generated with Claude Code